package com.yuexun.beilunpatient.ui.doctorwarn.model.impl;

import com.yuexun.beilunpatient.base.BaseEntity;
import com.yuexun.beilunpatient.ui.doctorwarn.api.DocWarnApi;
import com.yuexun.beilunpatient.ui.doctorwarn.bean.DocWarnBean;
import com.yuexun.beilunpatient.ui.doctorwarn.model.IDocWarnModel;
import com.yuexun.beilunpatient.utils.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by chenss on 2018/9/3.
 */
public class DocWarnModel implements IDocWarnModel {

    private DocWarnApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public DocWarnApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(DocWarnApi.class);
        }
    }

    @Override
    public Observable<BaseEntity<DocWarnBean>> inquirePatientRemindListByPatient(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquirePatientRemindListByPatient(praise);
    }
}
